import { System } from "./System";
import { Register } from "../register/Register";
import { EventType} from "../event/index";
import { ComponentType } from "../component/Component";
/**
 * @class
 * @extends w.system.System
 * @memberof w.system
 */
class AnimationSystem extends System {
    constructor(opts = {}) {
        opts.eventType=EventType.FrameCompleted;
        super(opts);
    }
    run(event) {
        Register.instance.manager(ComponentType.Animation).components.forEach(animation=>{
            animation.play();
        })
    }
}

export { AnimationSystem }